﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using DaphneTranslatorWPF.ViewModel;

namespace DaphneTranslatorWPF.View
{
    /// <summary>
    /// Interaction logic for CultureSelectionDialog.xaml
    /// </summary>
    public partial class CultureSelectionDialog : Window
    {
        public CultureSelectionDialog()
        {
            InitializeComponent();
            this.DataContext = new CultureSelectionViewModel();
        }

        private void Button_Click(object sender, RoutedEventArgs e)
        {
            CultureSelectionViewModel vm = this.DataContext as CultureSelectionViewModel;
            if (string.IsNullOrWhiteSpace(vm.SelectedCulture))
            {
                MessageBox.Show("Please, select the culture", "Warning", MessageBoxButton.OK);
                return;
            }
            this.DialogResult = true;
        }
    }
}
